<style>
    .hotso a{
        display:inline-block;color:#19b1e3;margin: 6px 15px 6px 0;
    }
    .history a{
        color:#625d5e;
    }

    .cart-panel-ul{
        width: 383px;
        height: 300px;
        overflow: auto;
        background-color: rgba(255, 255, 255, 0.9);
        position: absolute;
        top: 36px;
        display: none;
        border: 1px solid #19b1e3;
    }
    .cart-panel-ul > li.menu {
        padding: 15px 10px;
        border-bottom: solid 1px #e5e5e5;
        clear: both;
        background: #fff;
    }
    .cart-panel-ul > li.menu:hover {
        background: #f1f1f1;
    }
    .cart-panel-ul  > li.menu>a {
        display: block;
    }
    .cart-panel-ul > li .imgpanel {
        float: left;
        text-align: center;
        padding: 0 15px;
    }
    .cart-panel-ul > li .imgpanel img {
        width: 100px;
    }
    .am-img-responsive {
        display: block;
        max-width: 100%;
        height: auto;
    }
    .cart-panel-ul > li .infopanel {
        width: auto;
        float: left;
    }
    .cart-panel-ul > li .infopanel h3 {
        color: #444444;
        margin-bottom: 0.3rem;
    }
    .cart-panel-ul > li .infopanel p {
        color: #888888;
        margin: 0.3rem;
    }
    .red2 {
        color: #ec2c2f;
    }
    .hdelete{
       margin:20px auto;padding: 10px;width: 200px;text-align: center;border: 1px solid #000;cursor:pointer ;
    }
    .red{
        color:#FF5959;
    }
    .hcartlist{
        width: 300px;
        height: 300px;
        overflow: auto;
        background: #fff;
        position: absolute;
        top: -65px;
        z-index: 9999;
        left: -282px;
        border: 1px solid #19b1e3;
        display: none;
    }
    .hcartlist li{
        /*border-bottom:1px solid #19b1e3 ;*/
    }
    .hcartlist li>span{
       display: inline-block;width: 30%;text-align: center;padding: 10px 0;
    }
    .maintop .left .meun a:hover{text-underline: none;}
    .maintop .left .meun a.active{
        color: #0c8bb4;
        font-size: 16px;
    }
    a.newsmessage b {
        position: absolute;
        top: 6px;
        left: 90px;
        display: block;
        width: 27px;
        height: 24px;color: red;
    }
</style>
<div class="maintop">
    <div class="left">
        <a href="{:Controller::_createUrl('index/index')}" class="logo" style="padding-left: 156px;padding-top: 4px;color: #0c8bb4">{$shop_app.title}<br>在线订货平台</a>
        <dl class="searchDiv">
            <dt><input class="text hvalue"  type="text" placeholder="输入商品条码，名称，自编码，首拼，关键字查询" maxlength="100"></dt>
            <dd><input type="button" value="搜   索" class="h-soso"></dd>
            <ul class="cart-panel-ul" >

            </ul>
        </dl>
        <div class="meun">
            <a href="{:Controller::_createUrl('index/index')}">首页</a>
            <a href="{:Controller::_createUrl('index/classification')}">商品分类</a>
            <a href="{:Controller::_createUrl('index/orders')}">订单管理</a>
            <a href="{:Controller::_createUrl('index/cart')}">购物车</a>
            <a href="{:Controller::_createUrl('index/collect')}">我的收藏</a>
            <!--<a href="{:Controller::_createUrl('index/account')}">用户账单</a>-->
            <a href="{:Controller::_createUrl('index/message')}" id="isNewMessage" class="newsmessage">最新消息<span></span> <if condition="$message_num gt 0"><b> [{$message_num}]</b></if></a>
            <a href="{:Controller::_createUrl('index/user_center')}">用户管理</a>
        </div>
    </div>
    <class  class="phone">服务热线：186-8503-5966</class>
    <div class="right">
        <div class="contact">
            <span class="mendoor" title="">门店:{:LoginHelper::getUserName()}-{:cookie :: get('account_user_name')}
            <a href="{:Controller::_createUrl('index/index')}" style="color:#0c8bb4">返回主页</a>
            </span>
            <a href="{:Controller::_createUrl('passport/logout')}" class="quit">退出</a>

        </div>

    </div>
    <div class="cart">
        <a href="{:Controller::_createUrl('index/cart')}">
            <div class="rightroud"></div>
            <div class="middleroud"> <span id="cartCount">{$cart_nums}</span>  | 购物车</div>
            <div class="leftroud"></div>
        </a>
            <ul class="hcartlist">
                <li><span>名称</span><span>单价</span><span>数量</span></li>
                <volist name="datas" id="hvo">
                    <li><span>{$hvo.m_name}</span><span>{$hvo.price}</span><span>{$hvo.total}</span></li>
                </volist>

            </ul>
    </div>
</div>
<input type="hidden" value="{:BaseController::getConfig('file_server_url')}/2013/" id="ad_img">
<input type="hidden" value="{:BaseController::_createUrl('index/detail')}/kid/" id="hidden_url">
<input type="hidden" value="{:BaseController::_createUrl('index/searchshop')}/keywords/" id="kwd_url">
<input type="hidden" value="__APP_SKIN__images/fault.jpg" id="hidden_img">
<!--头部结束-->
<script>
    $(function(){
        $(".cart-panel-ul").hide();
        var fileName=$("#ad_img").val();
        var hidden_url=$("#hidden_url").val();
        var hidden_img=$("#hidden_img").val();
        var kwd_url=$("#kwd_url").val();
        var timeout = 0;
        var ajaxCache = {};//定义缓存对象
        $('input.hvalue').keyup(function(){
            var inputValue = $(this).val();
            clearTimeout(timeout);
            timeout = setTimeout(function(){
                var keyword=$(".hvalue").val();
                searchHttpHelper.getMenuList($(".cart-panel-ul"),fileName,hidden_url,1,inputValue,hidden_img);
            },1000);
        });
        $(".h-soso").click(function(){
            var keyword=$(".hvalue").val();
            window.location.href = "{:BaseController::_createUrl('index/searchshop')}/keywords/" + keyword;
        })
        $("input.hvalue").focus(function(){
            var keyword=$(".hvalue").val();
            if(!keyword){
                searchHttpHelper.getHots( $(".cart-panel-ul"),'',kwd_url);
            }
            $(".cart-panel-ul").show();

        })
        $("input.hvalue").blur(function(){
            $(".cart-panel-ul").hide();

        })

        $(".cart-panel-ul").hover(function(){
            $(".cart-panel-ul").show();
            $("input.hvalue").blur(function(){
                $(".cart-panel-ul").show();

            })
        },function(){
            $(".cart-panel-ul").hide();
            $("input.hvalue").blur(function(){
                $(".cart-panel-ul").hide();
            })
        });
//        searchHttpHelper.getHots( $(".cart-panel-ul"),'',hidden_url);
        $(".hcartlist").hide();
        if($(".hcartlist li").length>1){
            $(".cart>a").hover(function(){
                $(".hcartlist").show();
            },function(){
                $(".hcartlist").hide();
            });
            $(".hcartlist").hover(function(){
                $(".hcartlist").show();
            },function(){
                $(".hcartlist").hide();
            });
        }


    })
</script>